<template>
  <div>
    <div class="post-container " @click="topicTodetail(tabId,topicItem)">                
      <div class="post-thumb"><img v-lazy="topicimg" /></div>
      <div class="post-content">
          <p class="post-title">{{title}}</p>
          <p class="post-abbreviations">{{abbreviations}}</p>
      </div>
    </div>
    <!-- <div class="body-sep" v-if="topicindex!=topiclength-1" ></div> -->
  </div>
</template>
<script>
export default {
  props: [
    "topictype",
    "followNumber",
    "title",
    "abbreviations",
    "topicimg",
    "tabId",
    "topicItem",
    "topicindex",
    // "topiclength"
  ],
  mounted(){
  },
  methods: {
    topicTodetail(tabId, topicItem) {
      this.$emit("topicback", { tabId: tabId, topicItem: topicItem ,topicindex:this.topicindex});
    },
  
  }
};
</script>
<style scoped>
.post-container {
  padding: 0.3rem;
  overflow: auto;
  background: #fff;
}
.post-thumb {
  float: left;
}
.post-thumb img {
  display: block;
  width: 3rem;
  height: 1.5rem;
}
.post-content {
  margin-left: 3.3rem;
}
.post-abbreviations {
  font-size: 0.22rem;
  color: #6e6e6e;
  margin: 0;
  clear: inherit;
  text-overflow: ellipsis;
  overflow: hidden;
  word-wrap: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.post-title {
  overflow:hidden; 
  text-overflow:ellipsis;
  display:-webkit-box; 
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2; 
  clear: inherit;
  font-weight: bold;
  font-size: 0.28rem;
  color: #333333;
  margin: 0.1rem 0 0.05rem 0;
  
}
.body-sep {
  /*width: 6.9rem;*/
  height: 1px;
  background-color: #e6e6e6;
}

</style>
